import { mapGetters } from 'vuex'

// 当有迷你播放器时，调整页面可滚动区域
export default {
    computed: {
        ...mapGetters([
            'playList'
        ])
    },
    methods: {
        handlePlayList(playList) {
            throw new Error('component must implement handlePlayList method')
        }
    },
    mounted() {
        this.handlePlayList(this.playList)
    },
    activated() {
        this.handlePlayList(this.playList)
    },
    watch: {
        playList(newVal) {
            this.handlePlayList(newVal)
        }
    }
}
